<template>
  <div class="star-main">
    <div class="star-main-head">
      <p>查看</p>
    </div>
    <el-table :data="tableData" style="width: 100%">
      <el-table-column type="index" />
      <el-table-column prop="Name" label="序列号"  />
    </el-table>
  </div>
</template>

<script>
import { reactive, onMounted, toRefs } from "vue";
import request from "@/http/request";

export default {
  setup(props) {
    const list = reactive({
      tableData: [],
    });

    onMounted(async () => {
       const userInfo = JSON.parse(sessionStorage.getItem("userInfo"));
      const { data } = await request.show({
           user_id:userInfo.user_id
      });
      list.tableData = data.data.all_cur_name;
    });

    return {
      ...toRefs(list),
    };
  },
};
</script>

<style scoped lang='scss'>
.star-main {
  border: 1px solid #dddddd;
  // width: 100%;
  max-width: 1100px;
  margin: 30px;
  border-radius: 10px;
  .star-main-head {
    width: 100%;
    height: 60px;
    background-color: #f5f5f5;
    margin-bottom: 30px;
    border-radius: 10px 10px 0 0;
    p {
      line-height: 60px;
      text-align: left;
      margin-left: 20px;
    }
  }
  .star-main-form {
    margin-left: 30px;
  }
  .star-main-footer {
    width: 100%;
    height: 60px;
    line-height: 60px;
    background-color: #f5f5f5;
    margin-top: 30px;
    border-radius: 0px 0px 10px 10px;
    button {
      background-color: #428bca;
    }
  }
}
</style>